<?php
class LoaderWindow extends GtkWindow {

	protected $progressBar;

	public function __construct() {
		parent::__construct(Gtk::WINDOW_POPUP);
		
		$this->set_keep_above(true);
		$this->set_default_size(350,200);
		$this->set_frame_dimensions(0, 0, 0, 0);
		
		$this->progressBar = new GtkProgressBar();

		$this->progressBar->set_size_request(250, 25);
		$this->progressBar->set_fraction(0);
		$this->progressBar->set_text('0%');
		
		$box = new GtkFixed();
		$box->put($this->progressBar, 50, 150);
		
		$this->add($box);
		
		$this->set_position(Gtk::WIN_POS_CENTER);
	}


	public function loadAll() {
		$this->progressBar->set_fraction(1);
		$this->progressBar->set_text('100%');

		Gtk::timeout_add(1000, array(Kernel::instance(), 'ideWindow'));
	}
}
?>
